//
//  QZHomeGuideView.m
//  shortvideoplay
//
//  Created by adam on 2024/9/4.
//

#import "QZHomeGuideView.h"

@implementation QZHomeGuideView

- (void)showOldAddNavViewToMainOldView1{
    UIView * oldBgSS = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    oldBgSS.clipsToBounds = YES;
    [self addSubview:oldBgSS];
    
    UIButton * sendBtn = [[UIButton alloc]initWithFrame:CGRectMake(KScreen_W-75, kStatusBarHeight+10, 60, 46)];
    sendBtn.layer.cornerRadius = 3;
    sendBtn.backgroundColor = [UIColor whiteColor];
    [sendBtn setTitle:@"发送" forState:UIControlStateNormal];
    [sendBtn setTitleColor:ColorHex(@"#333333") forState:UIControlStateNormal];
    sendBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    [sendBtn addTarget:self action:@selector(sendTap) forControlEvents:UIControlEventTouchUpInside];
    [oldBgSS addSubview:sendBtn];
    
    UIView * sendBg = [[UIView alloc]initWithFrame:CGRectMake(15, kStatusBarHeight+66, KScreen_W-30, (KScreen_H-KSafeAreaBottomHeight-25-(kStatusBarHeight+66))/2)];
    sendBg.backgroundColor = [UIColor whiteColor];
    sendBg.layer.cornerRadius = 3;
    [oldBgSS addSubview:sendBg];
    
    UILabel * sendTip = [[UILabel alloc]initWithFrame:CGRectMake(0, (sendBg.frame.size.height-40)/2, sendBg.frame.size.width, 40)];
    sendTip.text = @"发送区";
    sendTip.textColor = ColorHex(@"#f0f0f0");
    sendTip.textAlignment = NSTextAlignmentCenter;
    sendTip.font = [UIFont systemFontOfSize:28];
    [sendBg addSubview:sendTip];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    self.upload_tip_view.layer.cornerRadius = 10;
    self.upload_tip_view.clipsToBounds = YES;
    self.upload_next.backgroundColor = ColorHex_Alpha(@"FFFFFF", 0.48);
    self.upload_next.layer.cornerRadius = 12;
    self.upload_next.clipsToBounds = YES;
    self.upload_line_bottom.constant = KSafeAreaBottomHeight+10;
    
    self.jb_tip_view.layer.cornerRadius = 10;
    self.jb_tip_view.clipsToBounds = YES;
    self.jb_next_bottom.backgroundColor = ColorHex_Alpha(@"FFFFFF", 0.48);
    self.jb_next_bottom.layer.cornerRadius = 12;
    self.jb_next_bottom.clipsToBounds = YES;
    self.jb_top.constant = 112+kStatusBarHeight;

}
- (IBAction)nextTap:(id)sender {
    self.QZHomeGuideBlock();
    self.upload_view.hidden = YES;
    self.jb_view.hidden = NO;
}
- (IBAction)jbNextTap:(id)sender {
    [self removeFromSuperview];
    [[NSUserDefaults standardUserDefaults] setValue:@"1" forKey:@"HOME_TIP_GUIDE_KEY"];
}

@end
